import { request, config } from 'utils'

const { api } = config
const { organization,department,document,documentInfo,newDocument,changeDocument,newGzcFile,newGzcFileSave,changeGzcFile,changeGzcFileSave,getGZCmatter,getPerson } = api

export async function organ (params) {
	return request({
	    url: organization,
	    method: 'post',
	    data: params,
	})	
}

export async function group (params) {
	return request({
	    url: department,
	    method: 'post',
	    data: params,
	})
}

export async function type (params) {
	return request({
		url:document,
		method:'get',
		data:params,
	})
}

export async function documentList (params) {
	return request({
		url:documentInfo,
		method:'get',
		data:params,
	})
}

export async function newFile (params){
	return request({
		url:newDocument,
		method:'get',
		data:params,
	})
}

export async function upChange (params){
	return request({
		url:changeDocument,
		method:'get',
		data:params,
	})
}

export async function newGzcFile1 (params){
	return request({
		url:newGzcFile,
		method:'post',
		data:params
	})
}

export async function newGzcFileSave1 (params){
	return request({
		url:newGzcFileSave,
		method:'post',
		data:params
	})
}

export async function changeGzcFile1 (params){
	return request({
		url:changeGzcFile,
		method:'post',
		data:params
	})
}

export async function changeGzcFileSave1 (params){
	return request({
		url:changeGzcFileSave,
		method:'post',
		data:params
	})
}

export async function getGZCmatter1 (params){
	return request({
		url:getGZCmatter,
		method:'post',
		data:params
	})
}

export async function getPerson1 (params){
	return request({
		url:getPerson,
		method:"post",
		data:params
	})
}